package svc

import (
	"github.com/zeromicro/go-zero/zrpc"
	"we-chat-login-sdk/api/internal/config"
	"we-chat-login-sdk/watchrpc/watchrpcclient"
)

type ServiceContext struct {
	Config   config.Config
	WatchRpc watchrpcclient.Watchrpc
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config:   c,
		WatchRpc: watchrpcclient.NewWatchrpc(zrpc.MustNewClient(c.WatchRpc)),
	}
}
